home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
minix
/
up1510b.tgz
/
up1510b
/
src
/
fs
/
filedes.c.D
< prev
next >
Wrap
Text File
|
1990-07-25
|
2KB
|
75 lines
*** /tmp/,RCSt1022217 Wed Jul 25 13:48:42 1990
--- filedes.c Mon Jul 23 10:35:55 1990
***************
*** 7,18 ****
*/
! #include "../h/const.h"
! #include "../h/type.h"
! #include "../h/error.h"
! #include "const.h"
! #include "type.h"
#include "file.h"
#include "fproc.h"
- #include "glo.h"
#include "inode.h"
--- 7,13 ----
*/
! #include "fs.h"
#include "file.h"
#include "fproc.h"
#include "inode.h"
***************
*** 20,25 ****
* get_fd *
*===========================================================================*/
! PUBLIC int get_fd(bits, k, fpt)
! mask_bits bits; /* mode of the file to be created (RWX bits) */
int *k; /* place to return file descriptor */
struct filp **fpt; /* place to return filp slot */
--- 15,21 ----
* get_fd *
*===========================================================================*/
! PUBLIC int get_fd(start, bits, k, fpt)
! int start; /* start of search (used for F_DUPFD) */
! mode_t bits; /* mode of the file to be created (RWX bits) */
int *k; /* place to return file descriptor */
struct filp **fpt; /* place to return filp slot */
***************
*** 36,40 ****
/* Search the fproc table for a free file descriptor. */
! for (i = 0; i < NR_FDS; i++) {
if (fp->fp_filp[i] == NIL_FILP) {
/* A file descriptor has been located. */
--- 32,36 ----
/* Search the fproc table for a free file descriptor. */
! for (i = start; i < OPEN_MAX; i++) {
if (fp->fp_filp[i] == NIL_FILP) {
/* A file descriptor has been located. */
***************
*** 52,55 ****
--- 48,52 ----
f->filp_mode = bits;
f->filp_pos = 0L;
+ f->filp_flags = 0;
*fpt = f;
return(OK);
***************
*** 71,75 ****
err_code = EBADF;
! if (fild < 0 || fild >= NR_FDS ) return(NIL_FILP);
return(fp->fp_filp[fild]); /* may also be NIL_FILP */
}
--- 68,72 ----
err_code = EBADF;
! if (fild < 0 || fild >= OPEN_MAX ) return(NIL_FILP);
return(fp->fp_filp[fild]); /* may also be NIL_FILP */
}